package com.kuangstudy.controller;

import com.kuangstudy.entity.Product;
import com.kuangstudy.service.random.DataRandomService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * @author renyitong
 * @version 1.0.0
 * @createTime 2023年09月19日
 * @Description
 */
@RestController
@Api(tags = "猜你喜欢的商品")
public class RandomProductController {

    @Autowired
    private DataRandomService dataRandomService;

    @PostMapping("/random/product/list")
    @ApiOperation("随机生成10条商品的数据")
    public List<Product> randomProductList(){
        List<Product> randomProductInfo = dataRandomService.getRandomProductInfo();
        return randomProductInfo;
    }

}
